//
//  FZComposeButtonInfo.swift
//  FZSina_Swift
//
//  Created by 李忠 on 7/28/16.
//  Copyright © 2016 FZLZ. All rights reserved.
//

import UIKit

class FZComposeButtonInfo: NSObject {

    var icon: String?
    var title: String?
    var nextvc: String?
    
    init(dict: [String: AnyObject]) {
        super.init()
        setValuesForKeysWithDictionary(dict)
    }
    
    override func setValue(value: AnyObject?, forUndefinedKey key: String) {
        
    }
    override init() {
        super.init()
    }

    func getButtonInfo() -> [FZComposeButtonInfo]{
        let filePath = NSBundle.mainBundle().pathForResource("compose.plist", ofType: nil)!
        let array = NSArray(contentsOfFile: filePath)!
        var tempArrM: [FZComposeButtonInfo] = [FZComposeButtonInfo]()
        
        for value in array {
            
            let btnInfo = FZComposeButtonInfo(dict: value as! [String: AnyObject])
            tempArrM.append(btnInfo)
        }
        return tempArrM
    }
}
